let filterDateT = value => {    //后台时间把 ‘T’过滤成 ‘’
   if (!value) {
    return value;
  }
  else {
    return value.replace('T', '  ');
  }

}
let filterDateAxis= time => {  //时间轴上的时间过滤
  if (!time) { return ''}
   else if (time.length < 18) {
    time = time.replace(/\//g, '-').substring(0, 9)
  }
  else {
    time = time.replace(/\//g, '-').substring(0, 10)
  }
  return time;
}
let filterTime = time => {  //把时间过滤成时分秒
  if (!time) {
    return ''
  } else {
    return time.substring(11);
  }
}
let filterDateTime = date => {
  if (!date) {
    return date;
  }
  else {
    return date.replace('T', '  ').substring(0, 10);
  }
}
export { filterDateT, filterDateAxis, filterTime, filterDateTime}
